package com.ruoyi.gis.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gis.mapper.GisLayerBaseMapper;
import com.ruoyi.gis.domain.GisLayerBase;
import com.ruoyi.gis.service.IGisLayerBaseService;

/**
 * 系统图层Service业务层处理
 * 
 * @author rww
 * @date 2023-11-16
 */
@Service
public class GisLayerBaseServiceImpl implements IGisLayerBaseService 
{
    @Autowired
    private GisLayerBaseMapper gisLayerBaseMapper;

    /**
     * 查询系统图层
     * 
     * @param layerId 系统图层主键
     * @return 系统图层
     */
    @Override
    public GisLayerBase selectGisLayerBaseByLayerId(Long layerId)
    {
        return gisLayerBaseMapper.selectGisLayerBaseByLayerId(layerId);
    }

    /**
     * 查询系统图层列表
     * 
     * @param gisLayerBase 系统图层
     * @return 系统图层
     */
    @Override
    public List<GisLayerBase> selectGisLayerBaseList(GisLayerBase gisLayerBase)
    {
        return gisLayerBaseMapper.selectGisLayerBaseList(gisLayerBase);
    }

    /**
     * 新增系统图层
     * 
     * @param gisLayerBase 系统图层
     * @return 结果
     */
    @Override
    public int insertGisLayerBase(GisLayerBase gisLayerBase)
    {
        gisLayerBase.setCreateTime(DateUtils.getNowDate());
        return gisLayerBaseMapper.insertGisLayerBase(gisLayerBase);
    }

    /**
     * 修改系统图层
     * 
     * @param gisLayerBase 系统图层
     * @return 结果
     */
    @Override
    public int updateGisLayerBase(GisLayerBase gisLayerBase)
    {
        gisLayerBase.setUpdateTime(DateUtils.getNowDate());
        return gisLayerBaseMapper.updateGisLayerBase(gisLayerBase);
    }

    /**
     * 批量删除系统图层
     * 
     * @param layerIds 需要删除的系统图层主键
     * @return 结果
     */
    @Override
    public int deleteGisLayerBaseByLayerIds(Long[] layerIds)
    {
        return gisLayerBaseMapper.deleteGisLayerBaseByLayerIds(layerIds);
    }

    /**
     * 删除系统图层信息
     * 
     * @param layerId 系统图层主键
     * @return 结果
     */
    @Override
    public int deleteGisLayerBaseByLayerId(Long layerId)
    {
        return gisLayerBaseMapper.deleteGisLayerBaseByLayerId(layerId);
    }
}
